import { View, Image } from '@tarojs/components';
import "taro-ui/dist/style/components/button.scss"; // 按需引入
import css from "./index.module.less";

export default function ThemeDtl(props) {
    const { title, contributorName, organizationName, checkTime, imgUrl, content, source, reviewerName, browsingAmount } = props.info;
    return (
        <View className={css.detail}>
            <View className={css.title}>
                {title}
            </View>
            <View className={css.info}>
                <View className={css.nameAndOrg}>
                    {contributorName}&nbsp;&nbsp;&nbsp;{organizationName}
                </View>
                <View className={css.timeAndBrowse}>
                    <View className='at-icon at-icon-clock'>
                        &nbsp;{checkTime}&nbsp;&nbsp;&nbsp;
                    </View>
                    <View className='at-icon at-icon-eye'>
                        &nbsp;{browsingAmount}
                    </View>
                </View>
            </View>
            {
                imgUrl === '' ? <></> :
                    <View className={css.image}>
                        <Image className='at-article__img' src={imgUrl} />
                    </View>
            }
            <View className={css.content}>
                {content}
            </View>
            <View className={css.bottomInfo}>
                来源 : {source}&nbsp;&nbsp;
                编辑 : {contributorName}&nbsp;&nbsp;
                审核 : {reviewerName}&nbsp;&nbsp;
            </View>
        </View>
    );
}